// 一级、二级、三级分类返回值对象类型
export interface categoryItem {
  id: number;
  name: string;
  category1Id?: number;
  category2Id?: number;
  category3Id?: number;
}
// 一级、二级、三级分类列表
export type categoryList = categoryItem[];

// 平台属性列表的返回值
/*"data": [
      {
        "id": 107,
        "attrName": "电池容量",
        "categoryId": 13,
        "categoryLevel": 2,
        "attrValueList":[
          {
            "id": 177,
            "valueName": "1200mAh以下",
            "attrId": 107
          }
        ]
      }
    ], */
export interface attrValueItem {
  key?: number;
  id?: number;
  valueName: string;
  attrId?: number;
}
export type attrValueListType = attrValueItem[];
export interface attrItem {
  id?: number;
  attrName: string;
  categoryId: number;
  categoryLevel: number;
  attrValueList: attrValueListType
}
export type attrListType = attrItem[]

export interface EditableRowProps {
  index: number;
}
export interface Item {
  key?:React.Key,
  id?: number;
  valueName: string;
  attrId?: number;
}
export interface EditableCellProps {
  title: React.ReactNode;
  editable: boolean;
  children: React.ReactNode;
  dataIndex: keyof Item;
  record: Item;
  handleSave: (record: Item) => void;
}
